       if(reading != buttonState){
         buttonState=reading;
         if(buttonState==LOW){
-          if(mode != 0){
-            changeMode(0);
+          // if(mode != 0){
+          //   changeMode(0);
+          // }
+          // else{
+          //   changeMode(1);
+          // }
+          lastButtonTime=millis();
+        }
+        else{
+          // every process is done when the button is released
+          if(millis()-lastButtonTime>longPush){
+            // register a long press
+            if(mode==0){
+              changeMode(1);
+            }
+            else{
+              changeMode(0);
+            }
           }
           else{
-            changeMode(1);
+            // register a short press
+            switch (mode) {
+              case 1:
+                changeMode(4);
+                break;
+              case 4:
+                changeMode(5);
+                break;
+              case 5:
+                changeMode(1);
+                break;
+              default:
+                break;
+            }
           }
         }
       }

    case 3:
      //warning mode- 10minutes have passed
      break;
    default:
      break;
  }

          a=-abs(a);
        }
        color[i]=(a/mode1Duration+startColor[i])%256;
  //        color[i]=startColor[i];
        color[i]=(int)(color[i]*ratio);
      }
      if(millis()-startCurrentMode>mode1Duration){
        changeMode(3);
      }
    }
  }
  else if(mode==2){
    if((millis()-startCurrentMode)%1000<600){
      color[0]=200;
      color[1]=200;
      color[2]=200;
    }
    else{
      color[0]=0;
      color[1]=0;
      color[2]=0;
    }
    //possible drowning
  }
  else if(mode==3){
    //10 minutes have passed
    if((millis()-startCurrentMode)%2000<1000){
      color[0]=0;
      color[1]=200;
      color[2]=0;
    }
    else{
      color[0]=0;
      color[1]=0;
      color[2]=0;
    }
  }
  else{
    color[0]=0;
    color[1]=0;
    color[2]=0;
  }
  for(int i=0; i<10; i++){
    setLED(i, color);
