Add algorithm Part I