create return code segment