avoid overcounting
refactoring