solved problem4