added category to matrix