Code from Michigan State REU 2012