diff --git a/api/endpoints/salamanderclass.py b/api/endpoints/salamanderclass.py
index 15893b7f3de06c02ad05ff8560da68785dc5d98b..98579f43f03f091a61b3a3eb86d0e033e5abb561 100644
--- a/api/endpoints/salamanderclass.py
+++ b/api/endpoints/salamanderclass.py
@@ -109,7 +109,7 @@ class SalamanderClass(Resource):
                                         else:
                                             add_salamander(salamander.id, image_id, data['new_location'], data['new_species'],
                                                            data['new_sex'], new_path_to_images, user_id, original_path, processed_path)
-                                        return handle_remaining_images(salamander, salamander_path, image_id, last_id)
+                                        return handle_remaining_images(salamander, salamander_path, image_id, last_id, True, result)
                                     else:
                                         return jsonify({"message": "Salamander image, " + data['image_id'] + " does not exist", 'status': 400})
                                     # if last image was moved:
@@ -117,7 +117,7 @@ class SalamanderClass(Resource):
                                     add_salamander(salamander.id, image_id, data['new_location'], data['new_species'],
                                                    data['new_sex'], new_path_to_images, user_id, original_path,
                                                    processed_path)
-                                    return handle_remaining_images(salamander, salamander_path, image_id, last_id)
+                                    return handle_remaining_images(salamander, salamander_path, image_id, last_id, False, 0)
                             else:
                                 return jsonify({"message": "Image id, " + data['image_id'] + " does not exist in salamander_id, " + data['id'], 'status': 400})
                         else:
@@ -137,13 +137,17 @@ def delete_growth_row(salamander_id, image_id):
         db.session.commit()
 
 
-def handle_remaining_images(salamander, salamander_path: str, image_id: int, last_id: int, ):
+def handle_remaining_images(salamander, salamander_path: str, image_id: int, last_id: int, match_bool, result):
     # if last image was moved:
     if len(os.listdir(salamander_path)) == 0:
         os.rmdir(salamander_path)
         db.session.delete(salamander)
         db.session.commit()
-        return jsonify({"id": salamander.id, "imageId": image_id, "message": "salamander moved", 'status': 200})
+        if match_bool:
+            return jsonify({"id": result, "matching": "Yes", 'status': 200})
+        else:
+            return jsonify({"id": salamander.id, "matching": "No", 'status': 200})
+
     else:
         if image_id != last_id:
             original_path = glob.glob(os.path.join(salamander_path, str(last_id) + '.*'))[0]
@@ -156,7 +160,10 @@ def handle_remaining_images(salamander, salamander_path: str, image_id: int, las
             db.session.commit()
             os.rename(processed_path, os.path.join(salamander_path, str(image_id) + "_str" + processed_extension))
             os.rename(original_path, os.path.join(salamander_path, str(image_id) + original_extension))
-        return jsonify({"id": salamander.id, "message": "salamander moved", 'status': 200})
+        if match_bool:
+            return jsonify({"id": result, "matching": "Yes", 'status': 200})
+        else:
+            return jsonify({"id": salamander.id, "matching": "No", 'status': 200})
 
 
 def lower_image_id_growth_row(salamander_id, old_id, new_id):