templating works correctly