changed to use at Matlab