generator and receiver initial code