finish first step of LTRdigest refactoring