changes to MatrixBuilder calss