update go hash function