adding shuffle function to random.cpp