added "receive from server" method