boundary conditions handled