refactor asciitemplate