shortcut for check sorted
it is optimized