some scope code working