initial routing and templating