The old code doesnt work for migration part