optimization + task history