debug refactoring
debug stat