change the implementation of shuffle()