code generator step 1