made dropdown button functional for sorting by date and name