test cases, better scope declaration