modify to use AlgorithmTest