refactor post templates