adding groupByNodes() function, same as groupByNode() w/ several nodes