Selection of categories and fences