updated get() method for hash table