rewritten function identifier for switch node.
Added runningTotal node.