Change variable TAG to TREE