make template work with models data