finalized collision detection and added gamestates