beginnings of template system