setting up protocol to communicate.