Script that is called to run the algorithm