core.matrix implementation using expresso