compatability with matlab fixed