Add base class Alg