make better use of the Scope class