Sample code for the MAF book