changing boundary conditions