adding form validation