minor scope refactorings