tired to code mex file ~_~