rearrange memory tracking