Changed onclick to addeventlistener