improve fetch sorted doc