integrated old migration code.