Adapted to new categories format