beginning collision detection