diff --git a/Makefile b/Makefile
index 9d39059021ee1992612d17024d0c68575ec86854..ec1bbb0b5cbb87d338fdc0eea6e438bceaf8b352 100644
--- a/Makefile
+++ b/Makefile
@@ -1,40 +1,27 @@
+# Makefile
+
 .PHONY: all clean
 
 CXX = g++
-CXXFLAGS = -std=c++11 -O2 -Icrow/include
-LDFLAGS = -lpthread  # Add pthread library
+CXXFLAGS = -std=c++17 -O2 -Icrow/include -I$(BOOST_INCLUDE_DIR)
+LDFLAGS = -lpthread -lboost_system -lboost_thread
 
 TARGET = build/webservice
 SRC = src/main.cpp
 
-# Function to truncate a string to the first 10 characters and add "..." if longer
-define TRUNCATE
-$(shell \
-    str="$(1)"; \
-    len=$$(echo -n "$$str" | wc -c); \
-    if [ $$len -gt 20 ]; then \
-        short=$$(echo "$$str" | cut -c1-20); \
-        echo "$$short..."; \
-    else \
-        echo "$$str"; \
-    fi \
-)
-endef
-
-# Check if INCLUDE_DIR is set and valid
-ifdef INCLUDE_DIR
-    TRUNC_INCLUDE_DIR := $(call TRUNCATE,$(INCLUDE_DIR))
-    $(info INCLUDE_DIR is set to "$(TRUNC_INCLUDE_DIR)")
-    ifeq ($(shell [ -d "$(INCLUDE_DIR)" ] && echo yes || echo no),yes)
-        $(info Directory "$(TRUNC_INCLUDE_DIR)" exists. Adding to CXXFLAGS.)
-        CXXFLAGS += -I"$(INCLUDE_DIR)"
-    else
-        $(error Error: Directory "$(TRUNC_INCLUDE_DIR)" does not exist)
-    endif
-else
-    $(info INCLUDE_DIR is not set. Skipping additional include directories.)
+# Ensure BOOST_INCLUDE_DIR is set and valid
+ifndef BOOST_INCLUDE_DIR
+    $(error BOOST_INCLUDE_DIR is not set. Please set it to the path of your Boost include directory.)
+endif
+
+# Check if BOOST_INCLUDE_DIR exists
+ifeq ($(wildcard $(BOOST_INCLUDE_DIR)),)
+    $(error BOOST_INCLUDE_DIR "$(BOOST_INCLUDE_DIR)" does not exist. Please provide a valid path.)
 endif
 
+# Create build directory if it doesn't exist
+$(shell mkdir -p build)
+
 $(TARGET): $(SRC)
 	@echo "Compiling the project with CXXFLAGS: $(CXXFLAGS)"
 	$(CXX) $(CXXFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS)
diff --git a/src/main.cpp b/src/main.cpp
index 56021d05f1fd9488c33bdf95f56b195f95af9e02..1a518c914315275b4453af4b3a12e278dc0382ba 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,12 +1,13 @@
-#include "crow.h" 
+#include "crow.h"
 #include <cstdlib>
-#include <sstream> 
+#include <sstream>
+#include <fstream>
 
 int main() {
-    crow::SimpleApp app;  
-
-    CROW_ROUTE(app, "/execute").methods("POST"_method)([](const crow::request& req) {
+    crow::SimpleApp app;
 
+    CROW_ROUTE(app, "/execute").methods(crow::HTTPMethod::Post)
+    ([](const crow::request& req, crow::response& res) {
         std::string command = req.body;
 
         std::string full_command = command + " 2>&1 | tee output.txt";
@@ -18,10 +19,11 @@ int main() {
         output_buffer << output_file.rdbuf();
         std::string output = output_buffer.str();
 
-        return "Done";
+        res.write("Done");
+        res.end();
     });
 
     app.port(10001).multithreaded().run();
 
     return 0;
-}
+}
\ No newline at end of file