before categories sorting