add simple collision detection