updated form validation and extra tests