renamed migrate function