moved conditions into Switch node for compactness AND allowed generic configuration of record-based nodes