proper unification of predicates
some output fixes