equation sorting in Solver