better io with fgets+sscanf