rename and add find common ancestor