Added ability to specify which columns should be used for sorting
added ability to select columns to sort by, tested.