introduce mex write statements