solved problem #3