finish collision algorithm