moved templating to separate rep