amr_solve2: the cleanest code, I think