optimized scope issues