This module useses a simple sorting algorithm to sort alist in ascending and descending order