Created a collision handler
streamlined collision detection