nit: declare this variable closer to where it is used.