updated migration flow