refactored unification and defined the subsignature test