added different function for hashing