Remove for loop from shuffle function.