worked on form validation