reorder output