 int lin; //do we need to change the linear actuator state
 int lin_pin = 16;
 int vac_pin = 15;
+
+int global_state;
+int state_1, state_2, state_3;
+//
+
+void callibrate()
+{
+  while(!global_state)
+  {
+    if (!state_1){
+      
+      stepper1.step(1);
+    }
+    if (!state_2){
+      stepper2.step(1);
+    }
+    if (!state_3){
+      stepper3.step(1);
+    } 
+  }
+  state_1 = 0;
+  state_2 = 0;
+  state_3 = 0;
+  global_state = 0;
+}
+
+
+void interupt1(){
+  state_1 = 1;
+  global_state = (state_1 && state_2 && state_3);
+  pos1 = 0;
+  callibrate();
+}
+void interupt2(){
+  state_2 = 1;
+  global_state = (state_1 && state_2 && state_3);
+  pos2 = 0;
+  callibrate();
+}
+void interupt3(){
+  state_3 = 1;
+  global_state = (state_1 && state_2 && state_3);
+  pos3 = 0;
+  callibrate();
+}
+
+
+
+
 
 
 void move_ee(int goal1, int goal2, int goal3, int svgoal){

  stepper1.setSpeed(maxSpeed);
  stepper2.setSpeed(maxSpeed);
  stepper3.setSpeed(maxSpeed);

  //  float initShift = 0.0; //unknown units to move all motors at boot
  /*


char vac; //vaccume
char lin_ac; //linear actuator
int limit1;
int limit2;
int limit3;

void setup()
{

