changed inline event listeners to on