solved excercise 3