refactoring print magic