better collision detection, though still horribly off