source code from book