modified to irsend engineer. fix encode repeat problem