Update alg30
Implement alg31
Start implementing alg32