Added solutions to exercises 2.30 and 2.31