upstream imports
remove useless writemapdata function