Add basic algorithm