better code generation process