basic sort program