Added check that algorithms are equal