Start working on the algorithm