Sample code for the book