simplify check for algorithm