Corrected Merging of Algorithm_3d