simplified collision detection and add A,W,S,D key support