Remove variable declaration in for cycle