added solution to final problem 6