sort by step index