Added shuffling algorithm