adds changes to search function