better collision detection, but could be better still