`i` is already declared, please declare it once only, at the beginning of the function.