add collision detection