Adding function randomize. Fixing bag in function eachEqual