Changing map to unordered_map for better performance.