   measurevol();
   lcd.setCursor(0,1);
   lcd.print(tank);
-  int starttime = millis();
-   while (tank<15){
+  float starttime = millis();
+   while (tank<lvl){
     digitalWrite(fillpump, HIGH);
     measurevol();
-    delay(20000);}
+    lcd.setCursor(0,1);
+    lcd.print(tank);
+    delay(15000);}
     digitalWrite(fillpump, LOW);
 }
-void aeration(){//check depth and keep air on and pumps off for time period
+void aeration(float airduration, int lvl){//duration in min check depth and keep air on and pumps off for time period
+  airduration=airduration*60*1000;
   lcd.clear();
   lcd.setCursor(0,0);
   lcd.print("Aeration ");


void measurevol(){
  int junk = analogRead(depth);
  float tank1 = analogRead(depth)*0.438596-30.7018;
  float tank2 = analogRead(depth)*0.438596-30.7018;
  float tank3 = analogRead(depth)*0.438596-30.7018;
  float tank4 = analogRead(depth)*0.438596-30.7018;
  float tank5 = analogRead(depth)*0.438596-30.7018;
  float tank6 = analogRead(depth)*0.438596-30.7018;
  float tank7 = analogRead(depth)*0.438596-30.7018;
  float tank8 = analogRead(depth)*0.438596-30.7018;
  tank = (tank1 + tank2 + tank3 + tank4 + tank5 + tank6 + tank7 + tank8)/8;
}

  measurevol();
  lcd.setCursor(0,1);
  lcd.print(tank);
  float starttime = millis();
  delay(100);
  while ((millis()-starttime)<duration){//1min
    digitalWrite(skimmer, HIGH);
    lcd.setCursor(0,1);
  lcd.print(tank);
  delay(15000);}
    digitalWrite(skimmer, LOW);
}
void decant(int level){ // empty through decant pump checking volume
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Decant ");
