solved problem 351