Feature/fix csv row order 

with some unit tests for it