Initial code for transmit