basic algorithm combination done