optimize shuffle