category sort basic working