Adds sorting for steps.