fixed typo in hashing function