implemented more precise boundary conditions for FE2D