Add algorithm for updates