improved character expression codegen