modified the boundary condition