PrintLine refactored