added categorical and zone-based sorting