optimizes migration