alg 2 modification