* parameterized number of categories
 * filtering out X'es beforehand