this is exercise 5 from the precourse