refactor of outputline