Add hashing function.