Implementing dualGraph: Problems with adding nodes