refactor for inner shadowing