updates to alg1