added unification function