table stack to deal with nested function call