added function to get a book by id