exercise 2 + golfed exercise 1