added search/sort functionality + pagination for tables