modify searching method