Changed getline to cin