added validation for all fields