minor changes in read/write
new tests
pre-final