add code for xbee