correct (hopefully) hash table implementation