create migrate sub-routine