working on dialog and form validation