capture verify enclosing function