added basic form validation