added eventlistener for form submit