simple collision detection added