wagon sort