Migrated to mex helper utilities