     stepperEcurrPosition = 0;
     stepperEdestPosition = 0;
     laste = 0;
-    Serial.print("{ \"log\" : \"Extruder stepper axis zero success\"}");  
+    
+    //WAIT
+    line(45.0, 45.0, 5.0, 0.0);
     
 }
 // END ZEROAXIS()
 // ==============================================================================================================================================================================
 // START LINE()
 void line(double x, double y, double z, double e) {
-
-  //DISTANCESTEPS
-   double distance = sqrt( pow((float)(x - lastx),2) + pow( (float)(y - lasty),2) + pow( (float)(z - lastz), 2) + pow( (float)(e - laste), 2));
-   double steps = round(distance*500);
+   double distance = sqrt( pow((float)(x - lastx),2) + pow( (float)(y - lasty),2) + pow( (float)(z - lastz), 2) + pow( (float)(e - laste), 2) );
+   double steps = round(distance*50); // distance to move * (1mm / (circum/steps per rotation))
+   if (steps == 0) { steps = steps + 1; }
+  
+   for (int i = 0; i <= steps; i++) {   
+     double stepratio = i/steps;        
+
+     double newx = lastx + ((x-lastx) * stepratio);
+     double newy = lasty + ((y-lasty) * stepratio);     
+     double newz = lastz + ((z-lastz) * stepratio);          
+     double newe = laste + ((e-laste) * stepratio);  
+
+     double newxsteps = tablexsteps*(newx/tablexdistance);
+     double newysteps = tableysteps*(newy/tableydistance);  
+     double newzsteps = tablezsteps*(newz/tablezdistance);      
+     double newesteps = tableesteps*(newe/tableedistance); 
+     
+     newxsteps = newxsteps/2;
+     newysteps = newysteps/2;
+     newzsteps = newzsteps/2;
+     newesteps = newesteps/2;     
+      
+     stepperXdestPosition = round(newxsteps)*2;
+     stepperYdestPosition = round(newysteps)*2;
+     stepperZdestPosition = round(newzsteps)*2;
+     stepperEdestPosition = round(newesteps)*2;   
+
+
+     
+     while ((stepperXdistanceToGo() != 0) || (stepperYdistanceToGo() != 0) || (stepperZdistanceToGo() != 0) || (stepperEdistanceToGo() != 0)) {
+         stepperXrun();
+         stepperYrun();
+         stepperZrun();
+         stepperErun();      
+       } 
+   }
    
-        //calculate new step positions from micron position
-   double nx = tablexsteps*(x/tablexdistance);
-   double ny = tableysteps*(y/tableydistance);  
-   double nz = tablezsteps*(z/tablezdistance);      
-   double ne = tableesteps*(e/tableedistance);                
-
-   double cx = float(stepperXcurrPosition);
-   double cy = float(stepperYcurrPosition);   
-   double cz = float(stepperZcurrPosition);      
-   double ce = float(stepperEcurrPosition);         
-
-  
-   double dx = ((nx-cx)/steps);
-   double dy = ((ny-cy)/steps);   
-   double dz = ((nz-cz)/steps);      
-   double de = ((ne-ce)/steps);         
-
-   
-   //distance
-   /*
-   double deltax = lastx - x;
-   double deltay = lasty - y;
-   double deltaz = lastz - z;
-   double deltae = laste - e;   
-   Serial.print("{ \"deltax\" : \"");
-   Serial.print(deltax);
-   Serial.print("\", \"deltay\" : \"");   
-   Serial.print(deltay);   
-   Serial.print("\", \"deltaz\" : \"");   
-   Serial.print(deltaz);   
-   Serial.print("\", \"deltae\" : \"");   
-   Serial.print(deltae);      
-   Serial.println("\"}");
-   */
-   //
-  
    lastx = x;
    lasty = y;
    lastz = z;
    laste = e;
-    
-   for (int i = 0; i <= steps; i++) {   
-     double newx = cx + (dx*i);
-     double newy = cy + (dy*i);     
-     double newz = cz + (dz*i);          
-     double newe = ce + (de*i);     
-      
-     stepperXdestPosition = round(newx);
-     stepperYdestPosition = round(newy);
-     stepperZdestPosition = round(newz);
-     stepperEdestPosition = round(newe);     
-     
-     
-     while ((stepperXdistanceToGo() != 0) || (stepperYdistanceToGo() != 0) || (stepperZdistanceToGo() != 0) || (stepperEdistanceToGo() != 0)) {
-       ///GET THESE INTO THE MAIN LOOP
-       // NEED TO REFACTOR EVENT LOOP
-       
-         stepperXrun();
-         stepperYrun();
-         stepperZrun();
-         stepperErun();
-       
-       
-       } 
-   }
   
 }
 // END LINE();

      digitalWrite(motorpinZdir, LOW); 
      dir = -1;
    }
    //PULSE AT SPEED LIMIT
    if (micros() > (stepperZtimer+stepperZspeed)) {
      digitalWrite(motorpinZstep, stepperZtoggle);
      stepperZtimer = micros();
      stepperZtoggle = !stepperZtoggle;

  }
}

double stepperEdistanceToGo() { return abs(stepperEdestPosition - stepperEcurrPosition); }

void stepperErun() {
  double dir = 0;
  
  if (stepperEdistanceToGo() >= 1) {
    //SET DIRECTION
    if (stepperEdestPosition > stepperEcurrPosition) {
      digitalWrite(motorpinEdir, HIGH);
