add some comments to mexfunc.c