use getline instead of istream::operator>> because the input contains spaces