source code for the book