complete all the matrix object function