rearrange in order to resolve symbols