added Paul's changes related to node_attribute and plotflag