Part two of exercise 6