Try to figure out the design of migrate tool.