added validation to all fields