Added solutions for exercises 1.30 and 1.31