Adding Adam's solutions to exercises 2.1