changed block iteration and fixed player physics