rearrange to match outline order