added 3d element wise sums