changed the event to button click