add the algorithm