Coursework 2 for Comp2013