Once I understood what `group_by.with_index` and all the other methods were doing, your solution was relatively easy to follow. Good job!