Change search function return statement