Storing tasks in a collection