updated receive()