Add algorithm