add pruning
component tree nearly finished