read from ets, write to dets and ets