implements a ChooseSort