$prev_ref = $node;