little changes in read()