change map to unordered map for better efficency