restructuring templateNode