generate code: assign, return