migrate template setting into class