Created getBookDetails to return formatted book details