Line reordering