use unordered map/set for better performance