initial collision detection