Finished problem 7