add form submission functionality