working on ttyRead and ttyWrite
merge corrected