make templates work again but better