debug component, refactoring