         return tags[i]
     }
     
+    func getBookAtIndex(index: Int) -> Book {
+        return books[index]
+    }
+    
     func getBookFromTag(tag: String, atIndex i: Int) -> Book? {
         return dictionary[tag]?[i]
     }

        } else {
            dictionary[favoritesTag] = dictionary[favoritesTag]?.filter({ $0 !== book })
        }
        
        isLibraryChanged = true


    func sort() {
        tags.sortInPlace()
        
        books.sortInPlace(sortClosure)
        
        for tag in self.tags {
            dictionary[tag]?.sortInPlace(sortClosure)
        }
    }
    
