use vector instead of hash table