handle shuffle mode