working on search method