rationalise in-place editing into the helper