Create shuffle function.