Adding templating funcionallity