first version of reciever.cpp