update a new function findFirstCommonNode