made search functionality work