added collision detection and improved the camera