Removed shared_fn for tasks