extracted state factory defined node state loop