re #8924 first version complete with tests