search function changes