added problem 8 soln