fighting with scoping