migrate raw code