updated collide method