working on MATLAB interface functions