Wrote the map function for books.