Finish Selection() algorithm