minor refactor
add another sort order test
add history