redundant
reduce execution time by branching by node types