added problem 5 soln