Scope and logic