solved problem 30