add matrix to script