collisions work

Updated the collision function