adding functionality to search