Supplementary code for lecture given in Scalapeno July 17th, 2013