check for collisions