Add nested function test