         var previousRelationship : Relationship! = nil;
         var nextRelationship : Relationship! = nil;
         
-        var nextRelationshipID = aRelationship.endNodeNextRelationID
-        var previousRelationshipID = aRelationship.endNodePreviousRelationID
+        let nextRelationshipID = aRelationship.endNodeNextRelationID
+        let previousRelationshipID = aRelationship.endNodePreviousRelationID
         
         if (nextRelationshipID > 0) {
             nextRelationship = context!.readRelationship(nextRelationshipID)

        
        //NSMutableArray *inRelationships = [self inRelationshipArray];
        
        var lastRelationship = inRelationships.last
        
        if (lastRelationship != nil) {
            // it seems this node has already one or more relationships

            
            if (context != nil) {
                
                let relationship = context!.readRelationship(inRelationshipID)
                
                if (relationship != nil) {
                    return context!.readNode(relationship!.startNodeID)
