changed shuffle method