use map instead of dict