Updated mex api library