add form submit function