restore the return method of data in class matrix