using a hash table