generate code: if else