Added search functionality to the Library class