adjusted the names of istringstream variable names to make more sense