make templates a model