add deferredSort and its test
Merge branch 'sec09'