Function captureFn