added codegen and enhanced identifier definition