better for performance - global to local