Final, added collision detection