sorting the wagon