changed [i][p] indexing to [p][i] indexing in commitment openings.