fixing minor duplication bug in sorting algorithm
fixing minor duplication bug in sorting algorithm