huge performance increase on functionWrapper