Added start of part3 of solution.