basic collision detection
boundary collision