collision detection added (ish, untested we really need something to test it with)