raphrased several variables to be consistent with node/item terminology