this should be type parametrized so that non-int (e.g., long) or string node id values can be passed in.