added hashing method for fields