Added solutions to exercises 1.40 and 1.41