initial scope refactored