Add algorithm factory