added collision detection and walls