changed to unordered_map and hashing