Added a shuffling algorithm