modify linefeed logic