fixed routing and templating