replaced handleCollision with typeOfThing