modify the fgets