AddTask method