finish doTasks