Merging algo and identification of similar elements remaining in a workflow