common ancestor basic code