solved problem E