solved problem 29!