change closeRow again to be non-recursive