updated for form submit