updated form validation