added: submit button logic