preserve branch ordering in conversion to csv