added form validation
added error handler