Add additional classes to matrix