for loop nonsense fix
still error in for loops