scoping rules mean we need local helpers.