 
 void loop(){
   
-  coordinates_t position;
-  
+  coordinates_t position;  
   int status = Pozyx.doPositioning(&position, POZYX_2_5D, 1000);
   
-  if (status == POZYX_SUCCESS){
-    printCoordinates(position);
+  if (status == POZYX_SUCCESS)
+  {
+    // print out the result
+    if(!bProcessing){
+      printCoordinates(position);
+    }else{    
+      printCoordinatesProcessing(position);
+    }
   }
 }
 
+// function to print the coordinates to the serial monitor
 void printCoordinates(coordinates_t coor){
   
   Serial.print("x_mm: ");

  Pozyx.clearDevices();
     
  int status = Pozyx.doAnchorCalibration(POZYX_2D, 10, num_anchors, anchors, heights);
  
  if (status != POZYX_SUCCESS){
    Serial.println(status);

  }

  printCalibrationResult();
  delay(3000);

  Serial.println(F("Starting positioning: "));

