created search functionality