add a simple pruning technique