you forget to increament i.i should be increament by 1.