add directive stateChecker