added unification and type-raising but it's not quite working.