fixed a formula in ALG4