debug rearrange