moving code to templates
moving code to templates 2