working matrix from attributes