added templates and router