IOEntity wiring

so testing a new idea ..... but running into a problem i cant seem to get 2 IOEnitys to wire connect Via code ...... i see in each there is a outputs and inputs array ... but seems im missing something ...
Anybody have a example to push me in right direction
Would help alot 
Thanks

oooooo nevermind found it if anybody is interested to know

 start.Spawn();
                    end.Spawn();

                    Vector3 correction = start.transform.position - end.transform.position;
                    var list = new List<Vector3>();
                    list.Add(-correction);
                    list.Add(new Vector3(0, 0.1f, 0));
                   
                    var ioOutput = start.outputs[0];

                    ioOutput.connectedTo = new IOEntity.IORef();
                    ioOutput.connectedTo.Set(end);
                    ioOutput.connectedToSlot = 0;
                    ioOutput.linePoints = list.ToArray();
                    ioOutput.connectedTo.Init();

                    end.inputs[0].connectedTo = new IOEntity.IORef();
                    end.inputs[0].connectedTo.Set(start);
                    end.inputs[0].connectedToSlot = 0;
                    end.inputs[0].connectedTo.Init();
                    start.MarkDirtyForceUpdateOutputs();
                    start.SendNetworkUpdate();​