finish keyword based pruning