reformat. caught fgets retval to silence warning.