initialize i in the var statement