added sumofmatrix