complete porting of map to api