form validation mostly working