use SharedNodePointer in place of Node where appropriate