Assignment2 - solution to problem 1.a