add global matrix