refactor template: add base template