added solution to excercise 3