Refactoring of computation of distribution for every test Handler