better implementation of the hash-computer