implemented search method