Modified ascending method to account for case of multiple entries being the same