solved problem nine and ten