solved problem18