Further simplified the hash method.