getting scope errors