updates and add delete task method: