working O(N) with unordered_map