slightly improved template