added addReferences (one-way references), further testing needed
added addNodes function to client