Added randomness solution.