function run in Sitemap.php