             endNode.insertInRelationship(relationship)
             
             //NSMutableArray *outRelationships = [self outRelationshipArray];
-            var outRelationships = self.outRelationships
+            let outRelationships = self.outRelationships
             
             //SORelationship *lastRelationship = [outRelationships lastObject];
-            var lastRelationship = outRelationships.last
+            let lastRelationship = outRelationships.last
             
             // TODO: optional chaining?
             if (lastRelationship != nil) {

        
        if (context != nil) {
            // create an new realationship with a link to the this node
            var relationship =  Relationship(startNode: self) //[[SORelationship alloc] initWithStartNode:self];
            
            // create the ID of this new relationship without a CONTEXT WRITE
            // TODO: self registering??

            self.update()
        }
        
        //let index = find(outRelationships, aRelationship)// init outRelationships in worst case
        let index = outRelationships.indexOf(aRelationship)
        if let index = index {
            _outRelationships.removeAtIndex(index)
        }
    }


