Trouble with Serial Input

There is a thread that EVERY new Arduino user ought to be required to memorize:
http://forum.arduino.cc/index.php?topic=396450.0

There are several others that discuss the stupidity of using the String class on the Arduino that should be required reading.

STOP using the String class NOW.

STOP using delay().

      }
       {

START paying attention to where curly braces are required, where they are optional, and where they are stupid. I'll leave it to you to figure out which category each of these falls into, but I'll bet that you can guess, since I mentioned them at all, that one of them falls into the last category.