added computeBoundaryConditions method