cleaned up collision detection, added a hat