fix search method