add class field to the templates