2D case working, fixed the edge averaging/dot product matrix