implement dshare.util.matrix using 2 dimensional array