xor intended, so the callback is set up once and only once. I agree it's clumsy, but good enough for now imo

no objection to changing this later if the calling code wants different behavior