Code HAM to code switching