change messages from codegen to rebind