refactored dragging and connecting to work for new node structure