implement templates package