Included changes for collision detection