modified readXYZTData to return values