5.6 listing for selection sort