updating map to use api