tangent boundary conditions debugged