added templating methods