search implementaion phase1