Support nested function