improvement to mxp snippet