working sort prule