rearrange dependencies.