listening to button submit event