week 5: exercise 6 implementation