moved the template variables in the view