need to improve shuffle function?