Add new function to migrating script