Updated readme
Don't create a variable with the same name as an argument
Added missing semicolon
Declare i at top of function