Add receive2 code