Use improved hash function