implemented more of template package