randomness problem solved