adding an efficient pruning method. TODO: write up