These variable names are a bit terse. It might help to rename `d_h2` to `d2_max`, `d2` to `d2_max_j`, and `acc` to `d2_j`