Same that block is in the other method too. Maybe makes sense to try if looks better if extracted to separate function. That will also probably to getting rid of the kind of uncommon practice of assignment to a parameter (`lastRow`).