solved problem6