update matrix mids