write & read to end