Assignment 2 from Andrew McConachie