implemented general boundary conditions