Refactored Setter for HashTable