This line (`current_row = ...`) doesn't do anything (except inadvertently create a global var) and should be deleted.