Add Update Detection function