add getRemainingIter
correct sorted detection
avoid parameter assignment
faster getRemaining methods with faster sort check