implemented full unification