added hashing method