unify algoirithm