refactor & add this.template