add better scope validation