Instantiating function in processor to fix concurrency issues