added sorting by completeness