finish refactoring printer