add boundary conditions