added option to disable sorting