added search and sort