add submitForm function