updated the search method.
resolved merge issues.