- added withSort check