added solution to the LibraryQuery problem