organize the templating structure