bugfix: just hand over list of docs to sort function instead of tuple