added some receiving code