Complete exercises 5.6.1 to 5.6.4