refactoring - simplification of print call