added test case for variable by reference usage