refactored templaters