added useNoSort option