add scoping tests