output; refactoring