Setting up boundary conditions