remembering sorting state