refactored collide()