move sitemap logic into controller