alg working