create template using examples from twisted