variable scope validation