merging routine done