the validation of variable scope