documented implementation from previous commit