updated problem 417