updated to include server side form validation