Add a task for optimization