Added alg1