added functionality for non-directional nodes