Changed scanf to fgets