first implementation of template management