test inSorted