resize method for the HashTable