Simple improvement of hash function