refactor mustache template