Adding exercises 6 to 8