Get command from serial

So I tried this

void setup()
{
  Serial.begin(9600, SERIAL_8N1);  		//USB-Prog. Port
  Serial1.begin(9600, SERIAL_8N1);		//Serial Device
  Serial.setTimeout(500);
  Serial1.setTimeout(50);
}

void loop()
{
  String command = Serial1.readString();
  String a = "routine1";
  String b = "routine2";
  while (command == a){
  Serial.println("received-a");
  }
  if (command == b){
  Serial.println("received-b");
  }
  else {
  //do nothing.. for the moment :)
  }
}

This doesn't work because it misses line feed / carriage return characters, I guess