exercise 5 solution commented out