changed eventListener to onclick