rearrage samples