modified alg1.m