add ensureConnected for tutorial - and re-add stuff that got lost in the merge