sort mode settings
remove unused code