correctly reading in and filling in hash table