added ability to sort ascending and decending