made sort-by dropdown dynamically populated with available sort functions