test for var scope