removed magic number in loop condition
Change conversion loop index variable
removed Unused imports