load templates by reference