add some randomness on hash functions and remove printing