add search function and extend search page