adds search functionality