Updated refresh function to include shuffle