reading header, writing row work