     //delete previous bar if it is too long
     //todo optimize to only delete the needful
     if(engineVar.currentValue < engineVar.previousValue) {
-      lcd.write("                    ");
+      //lcd.write("                    ");
+
+      /*char *blank = malloc((20 - column) + 1);
+      memset(blank, ' ', (20 - column));
+      blank[(20 - column)] = '\0';
+      lcd.write(blank);
+      for(byte i = 0; i < (20 - column) + 1; i++) {
+        free(blank[i]);
+      }
+      free(blank);*/
+
+      /* HAVING MEMORY/PERFORMANCE ISSUES HERE. HARDCODING THIS SEEMS TO HELP. */
+
+      if(column == 0) {
+        lcd.write("                    ");  //hard coded value for dual mode
+      }
+      else {
+        lcd.write("           ");           //hard-coded value for quad mode
+      }
+      
+      
       lcd.setCursor(column, row);
     }
     

  currentMillis = millis();
  if(currentMillis - lastMillis >= interval) {
    lastMillis = currentMillis;
    if(engine_rpm.currentValue < 2000) {
      draw_octo_gauges();
    }
    else {
      draw_dual_gauges();
      
 
    }
  }
}


    lcd.setCursor(4, 0);
  }
  lcd.print(quadModeGauges[0][0]->currentValue, quadModeGauges[0][0]->decimalPlaces);
  draw_bar(*quadModeGauges[0][0], 0, 9);

  lcd.setCursor(4, 1);
  lcd.print(quadModeGauges[0][1]->currentValue, quadModeGauges[0][1]->decimalPlaces);
  draw_bar(*quadModeGauges[0][1], 1, 9);

  lcd.setCursor(4, 2);
  lcd.print(quadModeGauges[0][2]->currentValue, quadModeGauges[0][2]->decimalPlaces);
  draw_bar(*quadModeGauges[0][2], 2, 9);

  lcd.setCursor(4, 3);
  lcd.print(quadModeGauges[0][3]->currentValue, quadModeGauges[0][3]->decimalPlaces);
  draw_bar(*quadModeGauges[0][3], 3, 9);
}

void draw_octo_gauges() {
