refactor of the sitemap in nodejs