add txeof(not finished, not tested)