Finished problem 6.