modified exercise 9 added window.onload and binded onclick event through addEventListener