added the algorithm interface