Add shuffling library function