add collision detection logic