modified removeBookByTitle function