Updated mac mex