Finished solving problem 7