make each node aware of the type and group of its attached elements