improve walley_code_generation for the code generation for table