writes each row correctly, pretty slow though