nested function still can access its originating variable scope