implemented byte array sending to server