search function is updated