updated form with form validation