search functionality and bug fixes