fix search function
fix searching function