use \r not followed by a \n for clearing the line, too