added a shuffle function