tested to communicate with matlab