increased the loop numbers to make sure rand cover all cases