refactoring superscope