added hashing function