pruning
state management