solve problem 151