       radio.read(msg, 1);
       theChar = msg[0];
     }
- 
-    //Serial.print("this message: ");
-    //Serial.println(theMessage);
-
-    //theMessage = "10,2,5";
+  if(bufferVal <= 4)
+  {
     int delimiter = theMessage.indexOf(',');
-    //Serial.print("delimiter: ");
-    //Serial.println(delimiter);
     
     
-    //delimiter = theMessage.indexOf(',');
     int delimiter2 = theMessage.indexOf(',', (delimiter+1));
     int length = theMessage.length();
     char charBuf[length];

    int buttonVal = atof(charBuf);
    
    theMessage.substring(delimiter+1, delimiter2).toCharArray(charBuf,length);
    int xDir = atof(charBuf);

    theMessage.substring(delimiter2+1, theMessage.length()).toCharArray(charBuf,length);
    int yDir = atof(charBuf);

    if (xDir <= 1023 && yDir <= 1023)
    {
      xDir = map(xDir, 0, 1023, -255, 255);

String theMessage = "";
char theChar = 0;

int xBuffer[4];
int yBuffer[4];
int bufferVal = 0;
int xDir;
int yDir;

void setup(void)
{
