cleaned up
fixed a bug in unification