add check
do not print whitespace at end of line