added boundary conditions to main