migrate legacy mode