fixed crucial for i to for var i