update problem 4 solution