Completed exercises 3.20, 2.21, 3.22, 3.23