refactor templates ...