added validation for state