           }
           
           //else if ((ScannedCube[28] == f_color) && (ScannedCube[25] == d_color)) {          -----maybe to be deleted
+          //Check the front bottom edge and flip it if necessary
           else if (ScannedCube[25] == d_color) {
               virtualSequence(F("fDrd"));
           }
       }
-      
+      //Check the front-right edge and move it if necessary
       if (ScannedCube[23] == d_color) {
               if (ScannedCube[12] == r_color) {
                   virtualMove('r');

}


//Function that repeats scanning up to 3 times if the color was not defined
char scanResult(){
  char color;
  byte wrongScan = 0;
  do{
    scan_item();
    color = defineColor(f_RED, f_GREEN, f_BLUE);
    wrongScan++ ;
    if (color != 'X') { 
      break;

                  virtualMove('l');
              }
          }
      //Check the front-up edge and flips it if necessary  
      if (ScannedCube[19] == d_color) {
              if (ScannedCube[7] == f_color) {
                  virtualSequence(F("RurF"));
