revise functionality of search