added routing to templates