update collision detection, still an off-by-one somewhere...