added code to sort the reads in the order of the bins they are put