test case for using inside function