modified scoping