added templates and tests