added validation on forms