Update to use TaskBuilder instead of task function.