Added support for customSort option