rewrote some Shuffle() functions