implemented search function