implemented logicals with arbitrary child node count