solved problem three