     # please note the order of following assertions is important
     seed1 = {1406, 407_414, 139_258}
     seed2 = {1306, 421_106, 567_597}
-    :rand.seed(:exrop, seed1)
-    assert Enum.random(1..2) == 2
+    :rand.seed(:exsss, seed1)
+    assert Enum.random(1..2) == 1
     assert Enum.random(1..3) == 1
     assert Enum.random(3..1) == 2
 
-    :rand.seed(:exrop, seed2)
-    assert Enum.random(1..2) == 2
-    assert Enum.random(1..3) == 1
-
-    assert Enum.random(1..10//2) == 9
-    assert Enum.random(1..10//2) == 1
+    :rand.seed(:exsss, seed2)
+    assert Enum.random(1..2) == 1
+    assert Enum.random(1..3) == 2
+
+    assert Enum.random(1..10//2) == 7
+    assert Enum.random(1..10//2) == 5
   end
 
   test "reduce/2" do

    # please note the order of following assertions is important
    seed1 = {1406, 407_414, 139_258}
    seed2 = {1406, 421_106, 567_597}
    :rand.seed(:exrop, seed1)
    assert Enum.take_random(1..3, 1) == [3]
    :rand.seed(:exrop, seed1)
    assert Enum.take_random(1..3, 2) == [3, 2]
    :rand.seed(:exrop, seed1)
    assert Enum.take_random(1..3, 3) == [3, 2, 1]
    :rand.seed(:exrop, seed1)
    assert Enum.take_random(1..3, 4) == [3, 2, 1]
    :rand.seed(:exrop, seed1)
    assert Enum.take_random(3..1, 1) == [1]
    :rand.seed(:exrop, seed2)
    assert Enum.take_random(1..3, 1) == [1]
    :rand.seed(:exrop, seed2)
    assert Enum.take_random(1..3, 2) == [1, 3]
    :rand.seed(:exrop, seed2)
    assert Enum.take_random(1..3, 3) == [1, 3, 2]
    :rand.seed(:exrop, seed2)
    assert Enum.take_random(1..3, 4) == [1, 3, 2]

    # make sure optimizations don't change fixed seeded tests
    :rand.seed(:exrop, {101, 102, 103})
    one = Enum.take_random(1..100, 1)
    :rand.seed(:exrop, {101, 102, 103})
    two = Enum.take_random(1..100, 2)
    assert hd(one) == hd(two)
  end

    map = %{a: 1, b: 2, c: 3}
    seed1 = {1406, 407_414, 139_258}
    seed2 = {1406, 421_106, 567_597}
    :rand.seed(:exsss, seed1)
    assert Enum.take_random(map, 1) == [c: 3]
    :rand.seed(:exsss, seed1)
    assert Enum.take_random(map, 2) == [c: 3, a: 1]
    :rand.seed(:exsss, seed1)
    assert Enum.take_random(map, 3) == [c: 3, a: 1, b: 2]
    :rand.seed(:exsss, seed1)
    assert Enum.take_random(map, 4) == [c: 3, a: 1, b: 2]
    :rand.seed(:exsss, seed2)
    assert Enum.take_random(map, 1) == [a: 1]
    :rand.seed(:exsss, seed2)
    assert Enum.take_random(map, 2) == [a: 1, c: 3]
    :rand.seed(:exsss, seed2)
    assert Enum.take_random(map, 3) == [a: 1, c: 3, b: 2]
    :rand.seed(:exsss, seed2)
    assert Enum.take_random(map, 4) == [a: 1, c: 3, b: 2]
  end

