minor changes for matlab