Refactoring in adjusted counts
some refactoring