Added sendData function.