added setBoundaryConditions method