Exercises 6.1, 6.2 and 6.4 working