integrate collision detection