fix bug and add exact solution for 2D