Finished problem 2.