Can't you use `enumerate` instead of this `i=0... i+=1` pattern?