code for the book