Sorting by rules added