use hash table instead