arranged the type unification algorithm and added three quickcheck properties