generalise unification
update documentation