changed plan nodes to pointers