This basically is the sorting algorithm.