worked on collision detection