collisions with walls works fine