Added ability to use multiple tasks.