slave code works, this will send data to server