added form and error messages