Coding exercise for CSIRO 2013 CoP Cup