This does the same thing as the processing_service written in node.js but this is in c++ for faster processing