add method to get documents sorted
Merge remote-tracking branch 'origin/master'