support unordered_map if possible