add search and sort on main page