added name exchange and a blocking receive method