Almost working collision detection v.2.2