changes for Mathworks Fileexchange