- moved createMap function