Updated HashList to include the hashing function in the class