small output refactoring